import {
  BadRequestException,
  NotFoundException,
  ForbiddenException,
} from '@nestjs/common';

export class RelustService {}

export class Relust {
  data: any;
  code: number;
  msg: string;
  constructor(data: any = null, code = 0, msg = '') {
    this.data = data;
    this.code = code;
    this.msg = msg;
  }
}

export interface ICommonListContainer<T = any> {
  list: T[];
  pageNum: number;
  pageSize: number;
  pages: number;
  total: number;
}

/*
//参数不正确，异常返回、通用
export function statusReturn(code=400,msg='',data=null) {
    switch (code) {
      case 400:
        return new BadRequestException(data,msg)
    }

}
*/
